package com.yinhai.mycat_test.service.write;

import java.util.List;

import com.yinhai.mycat_test.VO.InsertOrderVO;
import com.yinhai.mycat_test.entity.Order;

public interface OrderWriteService {
    /**
     * 根据用户id插入订单
     *
     * @param insertOrderVO
     * @return
     */
    String insertOrderByUserId(InsertOrderVO insertOrderVO);
    
    /**
     * 删除订单
     *
     * @param userId
     * @param orderId
     * @return
     */
    String deleteOrderByOrderId(Long userId,Long orderId);
    
    /**
     * 批量删除某个用户的订单信息
     *
     * @param userId
     * @param orderIds
     * @return
     */
    String deleteOrderListByOrderIdAndUserId(Long userId,List<Long> orderIds);
    
    /**
     * 清空订单和详情
     *
     * @return
     */
    String emptyOrder();
    
    /**
     * 批量插入订单信息
     *
     * @param orderList
     * @return
     */
    String batchInsertOrder(List<Order> orderList);
    
    String insertOrder(Order order);
}
